package test.util;

import java.rmi.RemoteException;
import java.util.Calendar;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.TimeZone;
import java.util.Map.Entry;


import com.cait.workflowserver.assistantcomponent.timer.GeneralTimeLimitCalculator;
import com.cait.workflowserver.definition.enTimeUnits;
import com.cait.workflowserver.interactiveface.webservice.transportmodel.FilterXmlDeserializer;

import junit.framework.TestCase;
import test.WorkFlowTest;
//4dsd
public class textHtmlDecoder extends TestCase{

	public textHtmlDecoder(String arg0) {
		super(arg0);
		// TODO Auto-generated constructor stub
	}
	
	public void testDecoder()
	{
		System.out.println(com.cait.workflowserver.utils.html.HtmlDecoder.Decode("<div><div >三大法司法</div ><div >三大法司法</div ></div>"));
		Class[] cs=Class.class.getClasses();
		for(int i=0;i<cs.length;i++)
		{
			System.out.println(cs[i].getName());
		}
		//Class.class.getClassLoader().
//		String m="<?xml version=\"1.0\" encoding=\"UTF-8\"?><FilterDefinition><FilterType>BOTH</FilterType><FilterConditionType>AND</FilterConditionType><PageParm><PageIndex>0</PageIndex><PageSize>0</PageSize></PageParm><ConditionItems><ConditionItem><FieldName>sdfdsf</FieldName><Operater>EQUALS</Operater><FieldValue  DataType=\"STRING\">strff</FieldValue></ConditionItem><ConditionItem><FieldName>sdfdsf</FieldName><Operater>EQUALS</Operater><FieldValue  DataType=\"DATETIME\">2007-04-24 17:46:05</FieldValue></ConditionItem></ConditionItems><OrderItems><OrderItem><FieldName>dfdf</FieldName><OrderType>DESC</OrderType></OrderItem></OrderItems></FilterDefinition>";
//		com.cait.framework.data.filter.FilterDefinition fd=FilterXmlDeserializer.Deserialize(m);
//		System.out.println(fd.getConditionCollection().size());
//		System.out.println(fd.getOrderCollection().size());
//		String a="%#&%&amp;dsdjf&amp;&&lt;mdkr&lt;";
//		System.out.println(com.cait.workflowserver.utils.html.HtmlDecoder.Decode(a));
//		java.util.Calendar c= java.util.Calendar.getInstance();
//		// java.util.Calendar.getInstance(zone)
//		TimeZone tz=TimeZone.getDefault();
//		tz.setRawOffset(9);
//		c=c.getInstance(tz);
//		
//		//System.out.println(c.getTimeZone().getID());
//		//c.getTimeZone().setRawOffset(7);
//		//c.set(Calendar.AM_PM, Calendar.AM);// 
//		//TimeZone tz = new TimeZone();
//		System.out.println(com.cait.framework.Convert.toString(c,"yyyy-MM-dd HH:mm:ss"));
//		c.add(java.util.Calendar.MINUTE,-60*3);
//		System.out.println(com.cait.framework.Convert.toString(c,"yyyy-MM-dd HH:mm:ss"));
//		GeneralTimeLimitCalculator g=new GeneralTimeLimitCalculator();
//		int a=365*24*60*800;
//		
//		System.out.println(c.getActualMaximum(java.util.Calendar.DATE));
//		c=g.getFinalTime(c, enTimeUnits.MONTH, 3, 7*24*60);
//		System.out.println(com.cait.framework.Convert.toString(c,"yyyy-MM-dd HH:mm:ss"));
//		System.out.println(c.getActualMaximum(java.util.Calendar.DATE));
//		c=g.getFinalTime(c, enTimeUnits.MONTH, -9, 7*24*60);
//		System.out.println(com.cait.framework.Convert.toString(c,"yyyy-MM-dd HH:mm:ss"));
//		System.out.println(c.getActualMaximum(java.util.Calendar.DATE));
		//WebServiceAppInvoker wsa=new WebServiceAppInvoker();
		//wsa.callRemote("http://10.17.105.8:8080/service/WfCallBackService", null);
		///String m="ddd$yyy";
		//String[] l=m.split("\\$");
		//System.out.println(l[0]);
		//System.out.println(l[1]);
//		com.cait.service.ResCenterClient.connect("94773e53-e378-485e-81dd-3432789c4fc8", "http://cmp.changan.com/rescenter/services/ResCenterApi2");
//		try {
//			com.cait.service.rescenter.UserInfo u=com.cait.service.ResCenterClient.getResCenterApi().getUserByID("15153794-fb23-4dbb-93ec-3d1724713255", "e14d57q0-2810-4441-94c1-83a58bb00473");
//		   if(u!=null)
//		   {
//			   System.out.println(u.getUserId());
//		   }
//		} catch (RemoteException e) {
//			// TODO 自动生成 catch 块
//			e.printStackTrace();
//		}
//		long i=0;
//		long m=java.util.Calendar.getInstance().getTime().getTime();
//		for(i=0;i<100000000;i++)
//		{
//			
//		}
//		System.out.println(java.util.Calendar.getInstance().getTime().getTime()-m);
		//int firstDay=java.util.Calendar.getInstance().getActualMaximum(java.util.Calendar.DATE);
		
		 // System.out.println(firstDay);
//		String tempName = null;
//		tempName = "很快";
//
//		try {
//			tempName = new String(tempName.getBytes("GBK"), "iso8859-1");
//		} catch (Exception e1) {
//			e1.printStackTrace();
//		}
//		System.out.println(tempName);
	}
	

}
